import request from '@/utils/request';

let token = localStorage.getItem('token');

/**
 * 服务一览
 * @returns {*|void}
 */
export let service_list = () => {
    return request.post('/api/1.0/company/supplierservice/list', {
        token
    })
}

/**
 *
 应用开通申请
 */
export let appendHadnle = (
    companyId,
    companyName,
    companyHsCode,
    companyCode,
    companyAdress,
    companyContactsEmail,
    companyContactsName,
    companyContactsPhone,
    serviceId,
    serviceName,
    abutmentIp,
    abutmentMac,
    abutmentKey,
    meno
) => {
    return request.post('/api/1.0/company/supplierservice/append', {
        companyId: companyId,
        companyName: companyName,
        companyHsCode: companyHsCode,
        companyCode: companyCode,
        companyAdress: companyAdress,
        companyContactsEmail: companyContactsEmail,
        companyContactsName: companyContactsName,
        companyContactsPhone: companyContactsPhone,
        serviceId: serviceId,
        serviceName: serviceName,
        abutmentIp: abutmentIp,
        abutmentMac: abutmentMac,
        abutmentKey: abutmentKey,
        meno:meno,
        token: token
    })
}

/**
 企业应用申请信息查询
 */
export let getAppend = (companyId,serviceId) => {
    return request.post('/api/1.0/company/supplierservice/info', {
        token: token,
        companyId: companyId,
        serviceId: serviceId
    })
}

export let lastInfo = ()=>{
    return request.post('/api/1.0/company/supplierservice/last',{token})
}